/*
 * Point
 * 
 * initial implementation : 28.8.2007
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
//using System.Collections.Generic;
//using System.Text;
using Petra.Gis.Geometry.Support;


namespace Petra.Gis.Geometry
{
  /// <summary>
  /// point geometry is simple 3d gis point object
  /// given by its Origin
  /// </summary>
  //public class Point : pointGeometryBase
  public class Point : GeometryBase
  {
    protected double _rotation = 0;
    protected CoordinateList _coordList;



    public Point()
    {
      _valid = false;
    }




    public Point(double X, double Y, double Z){

      CoordinateList Coords = new CoordinateList(Dimension.dim3D, X, Y, Z);
      _coordList = Coords;
      _valid = true;
    }




    public virtual CoordinateList Origin
    {
      get { return _coordList; }
      set { if (value.Count != 1) throw new ArgumentException("Point coordlist must contain only one point"); _coordList = value; }
    }




    internal override BoundingBox getEnvelope()
    {
      //_envelope = new BoundingBox(_coordList[0].X, _coordList[0].Y, _coordList[0].X, _coordList[0].Y);
      //return _envelope;
      return _coordList.getEnvelope();
    }



    /*public double X
    {
      get { return oCoordinateList[0].X; }
        //set{BPoint.X = X;}
    }
    public double Y
    {
      get { return oCoordinateList[0].Y; }
        //set{BPoint.Y = Y;}
    }
    public double Z
    {
      get { return oCoordinateList[0].Z; }
      //set{BPoint.Z = Z;}
    }*/




    public virtual double Rotation
    {
      get { return _rotation; }
      set { _rotation = value; }
    }

  }

}
